<template>
	<div class="goodsdesc-container">
		<h3>{{ info.title }}</h3>
		<hr>
		<div class="content" v-html="info.content"></div>
	</div>
</template>

<script>
	var msg = {
		title: "阿甘的手机",
		content: "<p>阿甘牛逼</p><p>牛是牛逼</p><p>逼是牛逼</p><img src='src/img/img2.jpg'>"
	}
	export default {
		data() {
			return {
				info: {} //图文数据
			}
		},
		created() {
			// this.getGoodsDesc()
			this.info = msg
		},
		methods: {
			getGoodsDesc() {
				this.$http.get('/api/goods/getdesc/' + this.$route.params.id).then(result => {
					if(result.body.status ===0 ){
						this.info = result.body.message
					}
				})
			}
		}
	}
</script>

<style lang="scss"> /* <style lang="scss" scoped> */
	// 存在scoped图片无法变成100%
	.goodsdesc-container{
		padding: 0.25rem;
		h3{
			font-size: 16px;
			color: blue;
			text-align: center;
			margin: 0.9375rem 0;
		}
		.content {
			img{
				width: 100%;
			}
		}
	}
</style>